package com.sora.pipeline.domain.dto;

import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * 统计查询请求DTO
 * 
 * @author system
 * @since 2025-01-20
 */
@Data
public class StatisticsRequest {
    
    /**
     * 统计类型：task/defect/personnel/heatmap
     */
    @Pattern(regexp = "^(task|defect|personnel|heatmap)$", 
             message = "统计类型只能是task/defect/personnel/heatmap")
    private String type;
    
    /**
     * 统计周期：day/week/month/quarter/year
     */
    @Pattern(regexp = "^(day|week|month|quarter|year)$", 
             message = "统计周期只能是day/week/month/quarter/year")
    private String period;
    
    /**
     * 开始日期
     */
    private LocalDate startDate;
    
    /**
     * 结束日期
     */
    private LocalDate endDate;
    
    /**
     * 线路ID（可选）
     */
    private Long lineId;
    
    /**
     * 用户ID（可选）
     */
    private Long userId;
    
    /**
     * 导出格式：excel/pdf/csv
     */
    @Pattern(regexp = "^(excel|pdf|csv)$", 
             message = "导出格式只能是excel/pdf/csv")
    private String format;
}

